//这是测试学习static创建的类

public class Student {
    public String name;
    public int age;
    public String sex;
    public double score;
    private static String classRome;

    //实例代码块
    {
        System.out.println("实例化代码块");
        this.name = "zzr";
        this.age = 18;
        this.sex = "男";
        this.score = 100.0;
    }
    //静态化代码块
    static{
        System.out.println("静态化代码块");
        classRome = "11205";
    }
    public Student(){}
    public Student(String name, int age, String sex, double score) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.score = score;
    }

    public void printName(){
        System.out.println(this.name);
    }
    public static String getClassRome(){
        return classRome;
//        this.score = 20.0;//err
//        this.printName();//err
    }
}
